<?php
namespace app\admin\validate;

use think\Validate;

class OrdersValidate extends Validate
{
    protected $rule = [
        'uid'            => 'require',
        'aid'            => 'require',
        'o_code'         => 'require',
        'o_tprice'       => 'require|number',
        'o_status'       => 'require',
        'o_time'         => 'require',
        'o_type'         => 'require'
    ];

    protected $message = [
        'uid.require'             => '请选择会员',
        'aid.require'             => '请选择会员的收货地址',
        'o_code.require'          => '订单号不能为空',
        'o_number.require'        => '装箱数量不能为空',
        'o_tprice.require'        => '订单金额为空',
        'o_tprice.number'         => '订单金额只能为数字',
        'o_status.require'        => '状态不能为空',
        'o_type.require'          => '付款方式不能为空',
        'o_time.require'          => '付款时间/取消时间不能为空'
    ];
}